Repository navigation
Conversation
The customer row is now the last task, with the customer-account links ahead of it, so a failure of the last step rolls back every earlier one.
CRM events are matched on bank and customer number. Social media rows hold no bank, so they are only deleted when no customer of another bank has the same number.
…he customer cascade
Mandates are tied to an account, and the account cascade keeps them, so the customer cascade leaves them too.
…er cascade They are tied to an account, and the account cascade keeps them, so the customer cascade leaves them too.
Social media rows hold a customer number but no bank, so they cannot be told apart from those of a same-numbered customer at another bank. CRM events, which hold the bank, stay in the cascade.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The Customer cascade delete (
DELETE /obp/v4.0.0/management/cascading/banks/BANK_ID/customers/CUSTOMER_ID, roleCanDeleteCustomerCascade, routed only whenallow_cascade_delete=true) now also removes the customer's messages, dependants, links to other customers (on either side) and CRM events (matched on bank and customer number), on top of what it already removed. The Customer row is deleted last, so a failure of that step rolls back every earlier one, and the endpoint answers 404 (OBP-30046) for a Customer that belongs to a different bank than the one in the URL.Tests: one scenario per newly covered table (each also checks that another customer's rows stay), a bank-ownership scenario, and a rollback scenario in
CascadeDeleteAtomicityTest; the customer, atomicity, endpoint, account, bank, product, transaction, counterparty and Berlin Group consent-challenge cascade suites pass. Not covered: social media rows (they hold a customer number but no bank), standing orders, direct debits and mandates (they belong to the account, and the account cascade keeps them), card rows that name the customer, and child customers that point at a deleted parent.